package com.bx.implatform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bx.implatform.entity.UserBlacklist;
import com.bx.implatform.vo.UserBlackVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: Blue
 * @date: 2024-09-22
 * @version: 1.0
 */
public interface UserBlacklistMapper extends BaseMapper<UserBlacklist> {

    @Select("SELECT u.id, u.head_image_thumb, u.nick_name, u.sex FROM im_user_blacklist ub " +
            "LEFT JOIN im_user u ON u.id = ub.to_user_id WHERE ub.from_user_id = #{userId} and u.status = 0")
    List<UserBlackVO> selectBlacklist(Long userId);

}
